<?php
require_once 'models/model_construct.php';

class zone_geographique extends model_construct {

	private $_idzonegeo;
	private $_idzoneocc;
	private $_codeiso;
	private $_wikizonegeo;
	private $_nomzonegeo;
	private $_longitude;
	private $_latitude;
	private $_debut;
	private $_fin;
	
	public function exist_in($year) {
		$debut = $this->_debut->get_year();
		$fin = $this->_fin->get_year();
		if($debut == null) {
			if($fin == null)
				return false;
			else return $year <= $fin;
		}
		if($fin == null)
			return $year >= $debut;
		return $year >= $debut && $year <= $fin;
	}
	
	public function __construct($data) {
		parent::__construct($data);
	}
	
	public function set_idzonegeo($i) {
		$this->_idzonegeo = $i;
	}
	public function set_idzoneocc($i) {
		$this->_idzoneocc = $i;
	}
	
	public function set_codeiso($i) {
		$this->_codeiso = $i;
	}
	
	public function set_wikizonegeo($i) {
		$this->_wikizonegeo = $i;
	}
	
	public function set_nomzonegeo($i) {
		$this->_nomzonegeo = $i;
	}
	
	public function set_longitude($i) {
		$this->_longitude = $i;
	}
	
	public function set_latitude($i) {
		$this->_latitude = $i;
	}

	public function set_debut($i) {
		$this->_debut = $i;
	}

	public function set_fin($i) {
		$this->_fin = $i;
	}	
	/***********************/
	public function get_idzonegeo() {
		return $this->_idzonegeo;
	}

	public function get_idzoneocc() {
		return $this->_idzoneocc;
	}
	
	public function get_codeiso() {
		return $this->_codeiso;
	}
	
	public function get_wikizonegeo() {
		return $this->_wikizonegeo;
	}
	
	public function get_nomzonegeo() {
		return $this->_nomzonegeo;
	}

	public function get_longitude() {
		return $this->_longitude;
	}
	
	public function get_latitude() {
		return $this->_latitude;
	}
	
	public function get_debut() {
		return $this->_debut;
	}
	
	public function get_fin() {
		return $this->_fin;
	}
}
?>